package com.kantboot.business.bp.repository;

import com.kantboot.business.bp.domain.entity.BusBpSubject;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface BusBpSubjectRepository extends JpaRepository<BusBpSubject, Long>{

    @Query("""
    FROM BusBpSubject ORDER BY priority DESC
    """)
    List<BusBpSubject> findAll();


    @Query("""
    FROM BusBpSubject ORDER BY priority DESC
    """)
    Page<BusBpSubject> getBodyData(Pageable pageable);
}
